<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h1>温度转换</h1>
		<div >
			摄氏度；<input type="text" id="input1"><br>
			华氏度：<span id="resultSpan"></span><br>
			<button onclick="cal()">计算</button>
		</div>
		<script>
			function cal()
			{
				var input1=document.getElementById("input1")
				var sheshi =input1.value
				var huashi =sheshi/9*5+32;
				console.log(huashi)
				var resultSpan=document.getElementById("resultSpan")
				resultSpan.innerHTML=huashi
			}
		</script>
		
	</body>
</html>
